home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 51 / Amiga Format CD51 (2000-03-10)(Future Publishing)(GB)[!][issue 2000-04].iso / -in_the_mag- / pdselect / awnp / awnp-docs / texteditor.doc < prev    next >
Text File  |  2000-02-16  |  6KB  |  191 lines

  1. The TextEditor.gadget is only available under ADOS 3.5 . At this time only
  2. beta versions were available but the TextEditor gadget is so great it had to
  3. be included in AWNPipe. These functions should all work once it is released.
  4.  
  5.  
  6.  TextEditor gadget event.
  7. -------------------------
  8. An event is only generated when the user double clicks the gadget.
  9.  
  10. 'gadget GID DoubleClickPositionX DoubleClickPositionY'
  11.  
  12. DoubleClickPositionX/Y is the position in the current line the user double clicked.
  13.  
  14. NOTE: You must the TextEditor directly at appropriate times in your program. This means you should have modify turned on if the TextEditor gadget is not read only.
  15.  
  16.  
  17. TextEditor gadget parameters.
  18. -------------------------
  19.  
  20. font=GID
  21.  
  22. This sets the font for the gadget. The GID points to an ALREADY defined text attribute.
  23.  
  24. arrows (a)
  25.  
  26.  Give the TextEditor a scroll gadget on the right.
  27.  
  28. readonly (ro)
  29.  
  30.  This gadget is read only.
  31.  
  32. disable=number (dis=)
  33.  
  34.  The gadget is disabled if number = 0 , enabled if number != 0. Defaults to enabled.
  35.  
  36. export="num"
  37.  
  38.  Set the export hook for the TextEditor.
  39.  
  40. num=0  Plain text hook
  41. num=1  EMail hook
  42.  
  43. import="num"
  44.  
  45.  Set the import hook for the TextEditor.
  46.  
  47. num=0  Plain text hook
  48. num=1  EMail hook
  49. num=2  Mime hook
  50. num=3  Mime quoted hook
  51.  
  52. block
  53.  
  54.  The texteditor should mark a block of text as well as generate an event when it is double clicked.
  55.  
  56. gadgettext="text" (gt=)
  57.  
  58.  Set the text in the gadget.
  59. given.
  60.  
  61. bindata (bd)
  62.  
  63. The text will be passed to this pipe in binary after the command line. The gadgettext parameter now gives the length of the data. Setting datain means the data is read from an external file rather than the pipe.
  64.  
  65. datain="filename" (di=)
  66.  
  67.  Read the data for this gadget from a file.
  68. It is ignored if the Bindata keyword is not present. A length of 0 means to use the complete file.
  69.  
  70. minwidth=number (minw=)
  71.  
  72.  Set the minimum width for this gadget
  73.  
  74. minheight=number (minh=)
  75.  
  76.  Set the minimum height for this gadget
  77.  
  78. weightedwidth=number (weiw=)
  79.  
  80.  Set the weighted width for this gadget
  81.  
  82. weightedheight=number (weih=)
  83.  
  84.  Set the weighted height for this gadget
  85.  
  86. nominalsize (noms)
  87.  
  88.  Set this gadget to its nominal size.
  89.  
  90. replace=GID
  91.  
  92.  Use this gadget to replace an existing gadget specified by GID.
  93.  
  94. Fixed
  95.  
  96.  Use a fixed font for this TextEditor.
  97.  
  98. Definition Reply
  99. -----------------
  100.  
  101.  When the gadget creation is successful the pipe replies with
  102.  
  103. 'ok GID'
  104.  
  105. TextEditor gadget modify parameters.
  106. -------------------------
  107. read
  108.  
  109.  This should not be used with any other parameters. It is ALWAYS responded to with 'SIZE<newline>CHARACTERS'.
  110.  
  111. SIZE is the number or characters after the newline. The characters are the current contents of the TextEditor gadget.
  112.  
  113. info
  114.  
  115.  This should not be used with any other parameters. It is ALWAYS responded to with
  116. 'CURSORX CURSORY BLOCKMARKED [BSTARTX BSTARTY BEENDX BENDY]'.
  117.  
  118. CURSORX and CURSORY are the current cursor location, BLOCKMARKED=0 if no block is marked, BLOCKMARKED~=0 means a block is currently marked. BSTARTX/Y and BENDX/Y (the start and end of the marked block) are only given if BLOCKMARKED!=0.
  119.  
  120. update=number
  121.  
  122. If number=0 then turn off updating of the Texteditor gadget. If number!=0 then turn updating of the gadget back on.
  123.  
  124. disable=number (dis=)
  125.  
  126.  The gadget is disabled if number = 0 , enabled if number != 0.
  127.  
  128. readonly=num (ro=)
  129.  
  130.  if num != 0 then this gadget is read only. If num =0 then the gadget is NOT
  131. readonly.
  132.  
  133. clear
  134.  
  135.  Remove all text from the TextEditor gadget.
  136.  
  137. CursorY="num" (cy=)
  138.  
  139.  Set the cursor to Y position to num.
  140.  
  141. Cursorx="num" (cx=)
  142.  
  143.  Set the cursor to Y position to num.
  144.  
  145. command="string" (cmd=)
  146.  
  147.  Have the TextEditor gadget execute the Arexx command given in string.Command should not be used with other modify parameters.
  148.  
  149.  Command always replies with 'ok SUCCESS [SIZE] <newline>[CHARACTERS]'
  150.  if SUCCESS!=0 then the command was handled by the TextEditor, if SUCCESS=0 then the command was not recognised.
  151.  If the command succeeds you MUST check to see if SIZE is given. If size is specified you then read SIZE  the number or characters after the newline. This is data returned by the command to the TextEditor.
  152.  
  153. replace
  154.  
  155.  Replace the text highlighted with the text given in gadgettext.
  156.  
  157. Replace ALWAYS responds with 'RESULT' where result=0 if a marked string is not found, and RESULT !=0 if the replace is successful.
  158.  
  159. search
  160.  
  161.  Search for the text given in gadgettext.
  162.  
  163. Search ALWAYS responds with 'RESULT' where result=0 if the search string is not found, and RESULT !=0 if the search string is found.
  164.  
  165. gadgettext="text" (gt=)
  166.  
  167.  Insert the text in the gadget. OR text to search for if search parameter is specified, OR text to replace highlighted text with if replace is specified.
  168.  
  169. target="num" (tar=)
  170.  
  171.  If num=0 insert text at start of current contents. If num!=0 then insert text at the cursor position. If target is not specified the text is inserted at the end of the current contents.
  172. If target is not given insert text at cursor position (default).
  173.  
  174.   OR
  175.  
  176. With search, num is a bit field for search modifiers.
  177.  
  178. bit 0 (1)  search fromtop
  179. bit 1 (2)  search next (default)
  180. bit 2 (4)  search casesensitive
  181. bit 3 (8)  search dospattern
  182. bit 4 (16)  search backwards
  183.  
  184. Unfortunately this is implemented as a decimal number. See the 'Hints' section for easy ways to handle this.
  185.  
  186. bindata (bd)
  187.  
  188. The text will be passed to this pipe in binary after the command line. The gadgettext parameter now gives the length of the data. Note that you can NOT use datain during modify.
  189.  
  190. Search responds with 'ok RESULT' where result=0 if the search string is not found, and RESULT !=0 if the search string is found.
  191.